<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 2017/7/19
 * Time: 上午11:30
 */
?>

<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_content">
            <div class="x_panel">
                <div class="x_title">
                    <h2><i>客户列表</i></h2>
                    <ul class="nav navbar-right panel_toolbox">
                        <li>
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                        </li>
                        <li onclick="traderObj.lists(3,0)">
                            <a href="javascript:void(0)"><i class="fa fa-refresh"></i></a>
                        </li>
                        <?php if ($is_last) { ?>
                            <li onclick="traderObj.addForm()">
                                <a href="javascript:void(0)"><i class="fa fa-plus-circle"></i></a>
                            </li>
                        <?php } ?>
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <form class="form-inline hide-or-show" id="trader_search_form">
<!--                         <div class="form-group" style="padding: 2px;">
                            <select name="register_type" class="form-control">
                                <option value="-1">来源 - 全部</option>
                                <option value="1">来源 - 上级代理</option>
                                <option value="2">来源 - 网页注册</option>
                            </select>
                        </div> -->

                        <?php if (!$is_last) { ?>
                            <div class="form-group" style="padding: 2px;">
                                <input name='p_clientSN' class="form-control" placeholder="代理账号"/>
                            </div>
                        <?php } ?>

                        <div class="form-group" style="padding: 2px;">
                            <input name='clientSN' class="form-control" placeholder="客户编号 / 客户姓名"/>
                        </div>
                        <div class="form-group" style="padding: 2px;">
                            <button type="button" class="btn btn-sm btn-primary btn-block"
                                    onclick="traderObj.lists(1,1)">
                                查 询
                            </button>
                        </div>
                    </form>
                    <br/>

                    <div class="table-responsive">
                        <table class="table table-hover table-striped table-bordered" id="trader_lists_table">
                            <thead>
                            <tr>
                                <th>客户账号</th>
                                <th>姓名</th>
                                <th class="text-center">注册日期</th>
                                <th class="text-center">实名状态</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>

                    <div class="ln_solid"></div>

                    <form class="form-inline text-center">
                        <div class="form-group">
                            <button type="button" class="btn btn-sm btn-primary btn-block"
                                    onclick="traderObj.lists(1,1)">
                                &lt;&lt;
                            </button>
                        </div>
                        <div class="form-group">
                            <button type="button" class="btn btn-sm btn-primary btn-block"
                                    onclick="traderObj.lists(2,1)">
                                &lt;
                            </button>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <span class="input-group-addon">
                                    共 <span id="trader_lists_pageTotal"><?= $pageTotal; ?></span> 页
                                </span>
                                <input type="number" min="1" class="form-control" id="trader_lists_pageNo"
                                       placeholder="请输入要跳转的页码"
                                       value="<?= $pageNo; ?>" style="text-align: center;"/>

                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-primary btn-block"
                                            onclick="traderObj.lists(3,0)">翻 页</button>
                                </span>

                            </div>
                        </div>

                        <div class="form-group">
                            <button type="button" class="btn btn-sm btn-primary btn-block"
                                    onclick="traderObj.lists(2,2)">
                                &gt;
                            </button>
                        </div>
                        <div class="form-group">
                            <button type="button" class="btn btn-sm btn-primary btn-block"
                                    onclick="traderObj.lists(1,2)">
                                &gt;&gt;
                            </button>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>
<script>
    traderObj.lists(1, 1);
</script>